package ca.uvic.cs.cogz.util;

import java.text.AttributedString;

import org.jfree.chart.labels.PieSectionLabelGenerator;
import org.jfree.data.general.PieDataset;

public class CustomLabelGenerator implements PieSectionLabelGenerator {
	@SuppressWarnings("unchecked")
	public AttributedString generateAttributedSectionLabel(PieDataset pieDataset, Comparable key) {
		return new AttributedString(pieDataset.getValue(key).intValue() + "");
	}

	@SuppressWarnings("unchecked")
	public String generateSectionLabel(PieDataset pieDataset, Comparable key) {
		return pieDataset.getValue(key).intValue() + "";
	}
}